package com.neno.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.*;

/**
 * @Author: root
 * @Date: 2018/11/12 10:42
 */
@Data
@Entity
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class People {
    @Column(name = "age")
    private int age;
    @Column(name = "email")
    private String email;
    @EmbeddedId
    @AttributeOverrides({@AttributeOverride(name = "firstName", column = @Column(name = "first_name")), @AttributeOverride(name = "lastName", column = @Column(name = "last_name"))})
    private Name name;
}
